<div class="container">
  <h1>describe_table()</h1>
  <p class="signature">public function describe_table(string $table, bool $column_names_only = false): array|false</p>
  
  <h2>Description</h2>
  <div class="description">
    <p>
      Retrieves information about the structure of a database table. By default, it returns details of all columns in the specified table. Optionally, it can return only the column names if instructed.
    </p>
  </div>
  
  <h2>Parameters</h2>
  <table>
    <thead>
      <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        <th>Default</th>
        <th>Required</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>$table</td>
        <td>string</td>
        <td>The name of the table whose structure is to be described.</td>
        <td>N/A</td>
        <td>Required</td>
      </tr>
      <tr>
        <td>$column_names_only</td>
        <td>bool</td>
        <td>(optional) Whether to return only column names. Default is false.</td>
        <td>false</td>
        <td>Optional</td>
      </tr>
    </tbody>
  </table>
  
  <h2>Return Value</h2>
  <table>
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>array|false</td>
        <td>Returns an array of column details or an array of column names if $column_names_only is true. Returns false on failure.</td>
      </tr>
    </tbody>
  </table>
  
  <h2>Exceptions</h2>
  <table>
    <thead>
      <tr>
        <th>Exception Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>PDOException</td>
        <td>Thrown if there is an error executing the SQL query.</td>
      </tr>
    </tbody>
  </table>
  
  <h2>Example Usage</h2>
  <div class="example">
    <pre>$table_name = 'users'; // Example table name

// Get detailed information about table structure
$table_info = $this->model->describe_table($table_name);

// Display the information
json($table_info);</pre>
  </div>
  
  <h2>Alternative Example</h2>
  <div class="example">
    <pre>$table_name = 'users'; // Example table name

// Get only column names
$column_names = $this->model->describe_table($table_name, true);

// Display the column names
json($column_names);
</pre>
  </div>
</div>
